#include<bits/stdc++.h>
using namespace std;

int main()
{
	int num = 0;
	
	int a = 2019, b=324;
	while(a>0 && b>0)
	{
		int _max = max(a, b);
		int _min = min(a, b);
		a = _max - _min;
		b = _min;
		num++;
	}
	cout << num << endl;
	return 0;
 } 